import { request } from "@/utils/service"
import {
  DeliverResumeParams,
  getUserByCompanyResponse,
  InterviewByUserParams,
  QueryPaginationParams
} from "./types/interview"

// 用户投递简历
export function deliverResumeByUser(data: DeliverResumeParams) {
  return request<ApiResponseData<boolean>>({
    url: "interview/profile/push",
    method: "post",
    data
  })
}

// 用户获取面试进度请求
export function getCompanyByUser(data: QueryPaginationParams) {
  return request<getUserByCompanyResponse>({
    url: "interview/list/page/user",
    method: "post",
    data
  })
}

// 用户同意面试or拒绝面试
export function handleUserApprove(data: InterviewByUserParams) {
  return request<ApiResponseData<boolean>>({
    url: "interview/confirmOrRefuse",
    method: "post",
    data
  })
}
